<?php

class Talktangle_Form_Ads_Buy extends Engine_Form {

	public function init() {
		// Init form
        $this->setTitle('Buy an Ad');    
		$this->setDescription('Buy new position in banner');  

        
        $this->addElement('Text','fee_join',array(
            'label' => 'Join fee',
            'readonly' => true,
            'style' => 'width:80px;'
            
        ));        
        // add Terms of contract
        if(empty($this->admin)){
            $this->addElement('checkbox','checkbox',array(
                'label' => "I have read and agree to the terms of contract",
                'required' => true,
                'allowEmpty' => false,             
            ));
            $this->getElement('checkbox')->getDecorator('label')->setOptions(array('escape' => false));
        }
        

         // Element: execute
        $this->addElement('Button', 'execute', array (
                'label' => 'Add a New Member',
                'type' => 'submit',
                'ignore' => true,
                'decorators' => array (
                        'ViewHelper'
                )
        ));
        
        // Element: cancel
        $this->addElement('Cancel', 'cancel', array (
                'label' => 'cancel',
                'link' => true,
                'prependText' => ' or ',
                'onclick' => 'parent.Smoothbox.close();',
                'decorators' => array (
                        'ViewHelper'
                )
        ));

        // DisplayGroup: buttons
        $this->addDisplayGroup(array (
                'execute',
                'cancel'
                ), 'buttons', array (
                'decorators' => array (
                        'FormElements',
                        'DivDivDivWrapper'
                )
        ));
	}

}
